package com.fxp.article_comment.service;

import com.fxp.article_comment.dao.UserDao;
import com.fxp.article_comment.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Example;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class UserService{
    @Autowired
    private UserDao userDao;
    public User login(User user){
        return userDao.findAll(Example.of(user)).get(0);
    }
}
